package cn.schoolwow.workflow.entity;

import cn.schoolwow.quickdao.annotation.*;
import com.alibaba.fastjson.JSONObject;

import java.time.LocalDateTime;

@Comment("工作流定义")
@UniqueField(columns = "name")
public class WorkFlowDefinition {
    @Id
    private long id;

    @Comment("名称")
    @Constraint(notNull = true)
    @Index(indexType = IndexType.UNIQUE)
    private String name;

    @Comment("流程定义选项")
    private JSONObject option;

    @TableField(createdAt = true)
    private LocalDateTime createdAt;

    @TableField(updatedAt = true)
    private LocalDateTime updatedAt;

    public long getId() {
        return id;
    }

    public void setId(long id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public JSONObject getOption() {
        return option;
    }

    public void setOption(JSONObject option) {
        this.option = option;
    }

    public LocalDateTime getCreatedAt() {
        return createdAt;
    }

    public void setCreatedAt(LocalDateTime createdAt) {
        this.createdAt = createdAt;
    }

    public LocalDateTime getUpdatedAt() {
        return updatedAt;
    }

    public void setUpdatedAt(LocalDateTime updatedAt) {
        this.updatedAt = updatedAt;
    }
}
